<template>
    <el-dialog
        title="审核项目"
        :visible.sync="dialogVisible"
        width="40%"
        :before-close="handleClose">
        <div class="audit-project">
            <FormGroup v-if="addColumnConfig" style="margin-top: 20px" :searchConfig="addColumnConfig" ref="formParams" labelWidth="120px" labelPosition="right" />
        </div>
        <div class="dialog-footer">
            <el-button @click="handleClose">取 消</el-button>
            <el-button @click="handleClose" style="margin-left: 50px">确 定</el-button>
        </div>
        
    </el-dialog>
</template>
<script>
import { updateMessageTypeSort } from '@/api/inner-msg/index.js';
import FormGroup from '@/views/components/FormGroup';
const formConfig = [
    {
        type: 'content',
        value: '',
        label: '当前项目',
        keyIndex: 'name',
        placeholder: '输入名称。10字以内',
        span: 24,
        inputWidth: '300px',
        maxlength: 10,
        showWordLimit: true,
        inputType: 'text',
        disabled: true
    },
    {
        type: 'radio',
        value: '0',
        label: '审核',
        keyIndex: 'status',
        span: 24,
        options: [
            {
                value: '1',
                label: '通过'
            },
            {
                value: '0',
                label: '驳回'
            }
        ],
        disabled: true
    },
    {
        type: 'textarea',
        value: '',
        label: '备注',
        keyIndex: 'name',
        placeholder: '',
        span: 24,
        inputWidth: '300px',
        maxlength: 500,
        showWordLimit: true,
        rows: 5,
        disabled: true
    },
]
export default {
    components: { FormGroup },
    data() {
        return {
            dialogVisible: false,
            tableList: [],
            auditRadio: '',
            addColumnConfig: null
        };
    },
    methods: {
        handleClose() {
            this.dialogVisible = false;
            this.tableList = [];
            this.addColumnConfig = JSON.parse(JSON.stringify(formConfig));
        },
        open(row) {
            this.dialogVisible = true;
            let newConfig = JSON.parse(JSON.stringify(formConfig));
            newConfig[0].value = row.title;
            newConfig[1].value = row.examineStatus;
            newConfig[2].value = row.examineNotes;
            this.addColumnConfig = newConfig;
        },
    }
};
</script>
 
<style lang="scss" scoped>
    .dialog-footer {
        margin-top: 20px;
        text-align: center;
    }
</style>